#ifndef UNITSEARCH_H
#define UNITSEARCH_H

#include<QtSql>
#include<QtGui>
#include <QCoreApplication>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlTableModel>
#include <QSqlError>
#include <QDebug>

#include <QDialog>

#include <QDebug>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QList>


namespace Ui {
class UnitSearch;
}

class UnitSearch : public QDialog
{
    Q_OBJECT

public:
    explicit UnitSearch(QWidget *parent = 0);
    ~UnitSearch();
    UnitSearch *us;
    void treeItemRender(QString pitem, QString table, QString name);
    void treeRender();

private slots:


 // void on_treeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);

//    void on_all_itemClicked(QTreeWidgetItem *item, int column);

    void on_all_itemDoubleClicked(QTreeWidgetItem *item, int column);

    void on_choose_itemDoubleClicked(QTreeWidgetItem *item, int column);

    void on_MakeSure_clicked();


    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

private:
    Ui::UnitSearch *ui;
signals:
     void sendData(QString);   //用来传递数据的信号
};

#endif // UNITSEARCH_H
